/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.delivery.dao;

import com.mycompany.delivery.entities.Contact;
import java.util.List;

/**
 *
 * @author Jana Nemcova
 */
public interface ContactDAO {
   
    /**
     * Add new contact to database
     * @param contact
     */
   public void createContact(Contact contact);

    /**
     * Update old contact to new one in database
     * @param contact
     */
    public void updateContact(Contact contact);

    /**
     * Delete contact from database
     * @param contact
     */
    public void deleteContact(Contact contact);

    /**
     * Return contact by its ID
     * @param id
     * @return Contact
     */
    public Contact getContactById(Long id);

    /**
     * Return contacts by theirs name
     * @param id
     * @return List<Contact>
     */
    public List<Contact> getContactBySurname(String name);

    /**
     * Return all contacts
     * @return List<Contact>
     */   
   public List<Contact> getAllContacts();
     
}
